package com.jie.jie.mvp.persenter;

import com.jaydenxiao.common.baserx.RxSubscriber;
import com.jie.jie.mvp.contract.MvpContract;
import com.jie.jie.mvp.model.MvpdataBean;

/**
 * Created by jie on 2017/1/22.
 */

public class MvpPresenter extends MvpContract.Presenter {
    @Override
    public void getTextRequest( int pagesize, int page) {
        mModel.getfuli( pagesize, page).subscribe(new RxSubscriber<MvpdataBean>(mContext,false) {
            @Override
            protected void _onNext(MvpdataBean mvpdataBean) {
                mView.returnfuli(mvpdataBean);

            }

            @Override
            protected void _onError(String message) {

            }
        });
    }

    @Override
    public void getText1Request(int pagesize, int page) {
        mModel.getAndroid(pagesize, page).subscribe(new RxSubscriber<MvpdataBean>(mContext,false) {
            @Override
            protected void _onNext(MvpdataBean mvpdataBean) {
                mView.stopLoading();
                mView.returnAndroid(mvpdataBean);
            }

            @Override
            protected void _onError(String message) {

            }
        });
    }


}
